@use 'sass:map';
@use './src/styles/defaults/bootstrap-defaults' as bd;

$dark-secondary: darken(bd.$secondary, 4%);

::ng-deep cd-login {
  .form-group {
    background-color: $dark-secondary;
    border-left: 4px solid bd.$white;
    height: auto;
    margin-bottom: 2rem;

    &:focus-within {
      border-left: 4px solid map.get(bd.$theme-colors, 'accent');
    }
  }

  .btn-password,
  .btn-password:focus,
  .form-control,
  .form-control:focus {
    background-color: $dark-secondary;
    border: 0;
    box-shadow: none;
    color: bd.$body-color-bright;
    filter: none;
    outline: none;
  }

  .placeholder {
    color: bd.$gray-600;
  }

  .btn-password:focus {
    outline-color: bd.$primary;
  }
}

// This will override the colors applied by chrome
@keyframes autofill {
  to {
    background-color: $dark-secondary;
    color: bd.$body-color-bright;
  }
}

input:-webkit-autofill {
  animation-fill-mode: both;
  animation-name: autofill;
  border-radius: 0;
  box-shadow: 0 0 0 1000px $dark-secondary inset;
  -webkit-text-fill-color: bd.$body-color-bright;
  transition-property: none;
}
